﻿
#pragma once 

#include "UserObject.h"
#include "Mesh.h"

class Application;
class SGHSystem;

class RemapUserObject : public UserObject
{
public:
  RemapUserObject(const Configuration& cfg);
  ~RemapUserObject(){};

  void Init() override;
  void Execute() override;

  void RemapVarialbe();
  void LocateVariable();

  void BuildPeriodicMap();

private:
  Application& _app;
  SGHSystem& _sys;
  CoordinateSystem _coord, _disp;
  //ArrayHandle<Vec3f> _disp; // 位移

  /// @brief 虚拟时间步长
  Real _dtau; 
  int _n_step;
  Real _L1, _L2;
  int _interval;
  bool _restored = false;
  bool _periodic_bc = false;
};


